function add(){
	var associatedKeyID = window.location.href.split('=')[1];

	var menu = $("#txtTableName").val();
	if(menu == ""){
		layer.alert('菜单名不能为空', 2);
		return;
	}
	var path = $("#txtpath").val();
	if(path == ""){
		layer.alert('路径不能为空', 2);
		return;
	}
	
	
	var param = new Object();
	param.associatedKeyID = associatedKeyID;
	param.paramValue = menu;
	param.remark = path;
	var jsonData = JSON.stringify(param);
	$.ajax({
		type : 'post',
		dataType : 'json',
		contentType : "application/json",
		data : jsonData,
		url : ctx + "/admin/base.do?action=3",
		success : function(result) {
			window.location.href = "addSubMenu.jsp";
			layer.alert('新增成功', 1);
		}
	});
}